package cn.school.mybatis.service;

import cn.school.mybatis.pojo.Student;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;


import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class FastJSON {
    public static void main(String[] args) {
        Map map=new HashMap<>();
        List<Student> list=StudentService.STUDENT_SERVICE.search(1,20,map);
        String newJson= JSON.toJSONString(list,SerializerFeature.PrettyFormat,SerializerFeature.WriteNullListAsEmpty,SerializerFeature.WriteNullNumberAsZero);
        System.out.println(newJson);

    }
}
